﻿@model BillBox.Models.Subscriber

@{
    ViewBag.Title = "View Subscriber";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div class="row main">
    <div class="col-lg-12">
        <ol class="breadcrumb">
            <li>@Html.ActionLink("Home", "Index", "Default")</li>
            <li>@Html.ActionLink("Subscribers", "Index", "Subscriber")</li>
            <li class="active">View Subscriber</li>
        </ol>
        <!--<h1 class="page-header">View Agent</h1>-->
        <div class="panel panel-default">
            <div class="panel-heading">
                Subscriber Information
            </div>
            <div class="panel-body">
                <div class="table-responsive">
                    <table class="table table-striped table-bordered table-hover">
                        <thead>
                            <tr>
                                <th>
                                    @Html.DisplayNameFor(model => model.Name)
                                </th>
                                <th>
                                    @Html.DisplayNameFor(model => model.OperatingName)
                                </th>
                                <th>
                                    @Html.DisplayNameFor(model => model.AddressStreet)
                                </th>
                                <th>
                                    @Html.DisplayNameFor(model => model.ContactNumber)
                                </th>
                                <th>
                                    @Html.DisplayNameFor(model => model.FaxNumber)
                                </th>
                                <th>
                                    @Html.DisplayNameFor(model => model.EmailAddress)
                                </th>
                                <th>
                                    @Html.DisplayNameFor(model => model.Website)
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>
                                    @Html.DisplayFor(model => model.Name)
                                </td>


                                <td>
                                    @Html.DisplayFor(model => model.OperatingName)
                                </td>


                                <td>
                                    @Html.DisplayFor(model => model.AddressStreet)
                                    <br />
                                    @Html.DisplayFor(model => model.AddressCity)
                                    @if (Model.Parish != null)
                                    {
                                        <br />                 
                                        @Html.DisplayFor(model => model.Parish.Name)
                                    }
                                </td>


                                <td>
                                    @Html.DisplayFor(model => model.ContactNumber)
                                </td>


                                <td>
                                    @Html.DisplayFor(model => model.FaxNumber)
                                </td>


                                <td>
                                    @Html.DisplayFor(model => model.EmailAddress)
                                </td>

                                <td>
                                    @Html.DisplayFor(model => model.Website)
                                </td>
                            </tr>
                        </tbody>

                    </table>
                </div>


                <div class="table-responsive">
                    <table class="table table-striped table-bordered table-hover">
                        <caption>Capture Fields</caption>
                        <thead>
                            <tr>
                                <th>Name</th>
                                <th>Display Name</th>
                                <th>Type</th>
                                <th>Order</th>
                                <th>&nbsp;</th>
                            </tr>
                        </thead>
                        <tbody>
                            @foreach (BillBox.Models.CaptureField captureField in Model.CaptureFields)
                            {
                                <tr>
                                    <td>@captureField.Name</td>
                                    <td>@captureField.DisplayName</td>
                                    <td>@BillBox.Common.Util.GetFieldType(captureField.Type.GetValueOrDefault())</td>
                                    <td>@captureField.OrderNum</td>
                                    <td>@Html.ActionLink("Edit", "EditCaptureField", new { id = @captureField.CaptureFieldId })</td>
                                </tr>
                        
                            }
                        </tbody>
                        <tfoot></tfoot>
                    </table>
                </div>
            </div>
            <div class="panel-footer">
                <ul class="details-menu">
                    <li>@Html.ActionLink("Edit", "Edit", new { id = Model.SubscriberId }, new { @class = "btn btn-default" })</li>
                    <li>@Html.ActionLink("Add Capture Field", "CreateCaptureField", new { id = Model.SubscriberId }, new { @class = "btn btn-default" })</li>
                </ul>
            </div>
        </div>
    </div>
    <!-- /.col-lg-12 -->
</div>
